Due to interface issues, it can sometimes be difficult to quickly set your "Index Page"
aka "Home Page" aka "Start Page" in VoodooPad. This GUI AppleScript aids the process
by setting the start page to the currently open page of your active VoodooPad Document.
Note that this GUI script was tested in 2.1.2, and that the GUI might change in future versions.
set VPinfo to getVPinfo()
set theDoc to item 1 of VPinfo
set thePage to item 2 of VPinfo
set thePropWindow to theDoc & " Properties" as string
tell application "VoodooPad" to activate
tell application "System Events" to tell process "VoodooPad"
if (exists of window thePropWindow) is false then
click menu item "Document Info" of menu 1 of menu bar item "Page" of menu bar 1
repeat until (window thePropWindow exists)
delay 0.5
end repeat
end if
tell window thePropWindow
tell pop up button 1
click
click menu item thePage of menu 1
end tell
click button 1 -- close property window
end tell
end tell
on getVPinfo()
tell application "VoodooPad"
set oldDelims to AppleScript's text item delimiters
set theNames to ""
set theNames to name of window 1
if theNames is "" then set theNames to name of window 2
set AppleScript's text item delimiters to ".vdoc:"
set theNames to theNames's text items as list
set AppleScript's text item delimiters to oldDelims
end tell
return theNames
end getVPinfo
Submitted by – mike [dot] com [at] mac [dot] com